#ifndef WINDOW_H
#define WINDOW_H

#include <QGraphicsProxyWidget>
#include "global.h"

O_PRIVATE_DECLARE(Window);
class Window : public QGraphicsProxyWidget
{
    Q_OBJECT
public:
    Window(QGraphicsItem * parent = 0, Qt::WindowFlags wFlags = 0);
    virtual ~Window();

    QRectF boundingRect() const;
    void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option,
                          QWidget *widget);

protected:
    void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
    bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
    QVariant itemChange(GraphicsItemChange change, const QVariant &value);

private slots:
    void updateStep(qreal step);
    void stateChanged(QTimeLine::State);
    void zoomIn();
    void zoomOut();

private:
    O_PRIVATE_DECLARE_MEMBER(Window);
};

#endif // WINDOW_H
